home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CRandom 1.0 / READ ME < prev   
Encoding:
Text File  |  1994-11-30  |  1.1 KB  |  27 lines  |  [TEXT/R*ch]

  1. Name: CRandom
  2. Version: 1.0
  3. Category: classes
  4. Contributor: Jamie McCarthy <k044477@kzoo.edu>
  5. Date: 92-04
  6. TCL-Version: 1.1.x
  7. TCL-Language: C
  8. Copyright: Copyright (C) 1992 by Jamie R. McCarthy. All rights reserved.
  9.  
  10. A handy little random-number generator.  Just drop it in your project,
  11. include the header, and call "x = gRandom->linearShort(low, high)".
  12.  
  13. So far, the only implemented method to get random numbers is
  14. linearShort(), which will return a signed 16-bit value between two
  15. numbers you specify, with equal probability of each number occurring.
  16. I've been meaning to write spinoffs of linearShort(), like
  17. poissonShort() and bellCurveShort(), but haven't gotten around to it.
  18. If you'd like to see them (or if you make one), drop me a line.
  19.  
  20. The algorithm is straight out of Numerical Recipes, translated from
  21. the original Fortran version.  I've made it as clear as possible, and
  22. kept it reasonably fast without dropping into assembly.
  23.  
  24. (c) Copyright 1992 by James R. McCarthy.  All rights reserved.
  25. This code can be both distributed and used freely.
  26. Internet: k044477@kzoo.edu            AppleLink: j.mccarthy
  27.